import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue'
import VueRouter from "vue-router";
import router from "./router/index";
import axios from "axios";

axios.defaults.headers.post['Content-Type']='application/x-www-form-urlencoded';
axios.defaults.withCredentials=true;
axios.defaults.baseURL="http://localhost:8080/"
Vue.config.productionTip = false;
//安装ElementUI
Vue.use(ElementUI);
//安装VueRouter
Vue.use(VueRouter);

Vue.prototype.$http=axios;


new Vue({
  //相当于
  //components:{
  // App:App
  // }
  beforeCreate(){
    //安装全局事件总线
    Vue.prototype.$bus=this;
  },
  render: h => h(App),
router:router
}).$mount('#app')